package com.example.Cassandra;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.cassandra.config.CqlSessionFactoryBean;

@Configuration
public class FactoryBeanAppConfig {
    @Bean
    public CqlSessionFactoryBean session() {

        CqlSessionFactoryBean session = new CqlSessionFactoryBean();
        session.setContactPoints("192.168.1.254");
        session.setLocalDatacenter("datacenter1");
        session.setKeyspaceName("mytest");

        return session;
    }
}
